import { genComponentResolver } from './gen-component-resolver'

export const genXTailComponentResolver = (componentNameStartsWith: string, packageName: string) =>
  genComponentResolver(
    componentNameStartsWith,
    packageName,
    componentName => `${packageName}/es/components/${componentName}/${componentName}.css`
  )

export type GenXTailComponentResolverType = typeof genXTailComponentResolver

export const genXTailComponentResolverSSR = (
  componentNameStartsWith: string,
  packageName: string
) =>
  genComponentResolver(
    componentNameStartsWith,
    packageName,
    componentName => `${packageName}/lib/components/${componentName}/${componentName}.css`
  )

export type GenXTailComponentResolverSSRType = typeof genXTailComponentResolverSSR
